package edu.java.homework.hw07.test0512;

//Koi ot definiciite max1 do max4 sa korektni definicii
//za namirane na po-goliamoto ot dve chisla.
//Koi sa nedostatycite na nekorektnite definicii?

enum Bool {
    TRUE, FALSE;
}

public class Test0512 {

    static int max1(int x, int y) { // (1)
	// return (if (x>y) { x; } { y; });
	// if (x>y) { return x; } else{ return y; }
	return (x > y) ? x : y;
    }

    static int max2(int x, int y) { // (2)
	// return (if (x>y) { return x; } { return y; });
	if (x > y) {
	    return x;
	} else {
	    return y;
	}

    }

    static int max3(int x, int y) { // (3)

	switch ((x < y) ? 1 : 2) {
	case 1:
	    return y;
	default:
	    return x;
	}
    }

    static int max4(int x, int y) { // (4)
	 return -1;
    }

    static int max5(int x, int y) { // (5)
	if (x > y)
	    return x;
	return y;
    }

    public static void main(String[] args) {
	System.out.println(max1(3, 4));
	System.out.println(max2(3, 4));
	System.out.println(max3(3, 4));
	System.out.println(max4(3, 4));
	System.out.println(max5(3, 4));
    }
}